### 加入购物车
# 请求网址:http://182.92.81.159:8080/wx/cart/add
# 请求方法:POST
# 请求头：
# Content-Type: application/json;charset=utf-8
# X-Litemall-Token:TOKEN
# 请求体：{"goodsId":1181000,"number":1,"productId":2}

#导包
import requests
#创建接口类
class AddCartAPI:
    #初始化
    def __init__(self):
        self.url_add_cart = "http://192.168.10.132:8080/wx/cart/add"

    #封装接口方法
    def add_cart(self,token,test_data):
        return requests.post(url=self.url_add_cart,
                             headers={'Content-Type':'application/json;charset=utf-8',"X-Litemall-Token":token},
                             json=test_data)

